<!DOCTYPE html>
<html lang="en">
<head>
    <title>拜访详情</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=4a6c1b54">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <script src="https://file.ggxqce.com/web/vue.min.js"></script>
    <style>
        .leftStyle{
            width: 50%;
            float:left;
            font-size: 12px;
            text-align: center;
            height: 20px;
            line-height: 20px;
            background: #4293e4;
            cursor: pointer;
            color:#fff;
            border-right: 1px solid #ddd;
            margin-bottom: 10px;
        }
        .rightStyle{
            width: 50%;
            float:right;
            font-size: 12px;
            text-align: center;
            height: 20px;
            line-height: 20px;
            cursor: pointer;
            background: #4293e4;
            color:#fff;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
<section class="content"  id="app"  >
    <table class="table table-hover table-bordered text-center">
        <tr>
            <td style="width: 90px;">客户电话</td>
            <td width="150px"> {{detail.tel}}</td>
        </tr>
        <tr>
            <td>客户姓名</td>
            <td v-cloak>{{detail.name}}</td>
        </tr>
        <tr>
            <td>客户类型</td>
            <td v-cloak>{{detail.customerType}}</td>
        </tr>
        <tr>
            <td>客户信用</td>
            <td v-cloak>{{detail.customerCredit}}</td>
        </tr>
        <tr>
            <td>客户生日</td>
            <td v-cloak>{{detail.birthDay}}</td>
        </tr>
        <tr>
            <td>客户微信</td>
            <td v-cloak>{{detail.wechat}}</td>
        </tr>
        <tr>
            <td>客户来源</td>
            <td v-cloak>{{detail.source}}</td>
        </tr>
        <tr>
            <td>意向机型</td>
            <td v-cloak>{{detail.intentionModel}}</td>
        </tr>
        <tr>
            <td>购买方式</td>
            <td v-cloak>{{detail.buyType}}</td>
        </tr>
        <tr>
            <td>购买时间</td>
            <td v-cloak>{{detail.buyDate}}</td>
        </tr>
        <tr>
            <td>拜访时间</td>
            <td >{{detail.arrivalsTime?formatDate(detail.arrivalsTime):"-"}}/{{detail.leaveTime?formatDate(detail.leaveTime):"-"}}</td>
        </tr>
        <tr>
            <td>拜访方式</td>
            <td>
                <span v-if="detail.visitMode==1">面访</span>
                <span v-else-if="detail.visitMode==0">电访</span>
                <span v-else></span>
            </td>
        </tr>
        <tr>
            <td>拜访时长</td>
            <td  v-cloak>{{detail.time}}分</td>
        </tr>
        <tr>
            <td>陪同人员</td>
            <td v-cloak>{{detail.entourage}}</td>
        </tr>
        <tr>
            <td height="42px">拜访情况</td>
            <td style="text-align: left;">{{detail.otherCondition}}</td>
        </tr>
        <tr>
    </table>
    <div style="height:407px;overflow: hidden">
        <img style="width: 100%;height: 100%;" v-if="detail.leaveImg" :src="detail.leaveImg" alt="">
    </div>
    <!-- /.box-body -->
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=602456c3"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=6348cbbc"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript">
    console.log(urlConfig);
    var app = new Vue({
        el:'#app',
        data:{
            currentUser:getCurrentUser(),
            reportVisit:{"faceTargetInfo":{"dayTarget":"","complete":""},"telTargeInfo":{"dayTarget":"","complete":""}},
            detail:{"faceTargetInfo":{"dayTarget":"","complete":""},"telTargeInfo":{"dayTarget":"","complete":""}},
            userId:$.wyui.page.urlParams.userId,
            name:$.wyui.page.urlParams.name,
            dateTime:$.wyui.page.urlParams.dateTime,
            index:$.wyui.page.urlParams.index,
            today:new Date().Format("yyyy-MM-dd")
        },
        methods:{
            prev:function () {
                var that=this;
                var number=Number(that.index)-1;
                if(that.reportVisit.faceTargetDay[number]){
                    var newId=that.reportVisit.faceTargetDay[number].customerId;
                    $.wyui.postMethod("/wreportCusVisit/getCustomerVisitById.json", {
                        "id":newId
                    }, function (map) {
                        console.log(map);
                        that.detail = map;
                        that.index=Number(that.index)-1;
                    });
                }else{
                    alert("没有上一个了");
                }
            },
            next:function(){
                var that=this;
                var number=Number(that.index)+1;
                if(that.reportVisit.faceTargetDay[number]){
                    var newId=that.reportVisit.faceTargetDay[number].customerId;
                    $.wyui.postMethod("/wreportCusVisit/getCustomerVisitById.json", {
                        "id":newId
                    }, function (map) {
                        console.log(map);
                        that.detail = map;
                        that.index=Number(that.index)+1;
                    });
                }else{
                    alert("没有下一个了");
                }


            },
            formatDate:function(now){
                var d=new Date(now);
                var hour=d.getHours();
                var minute=d.getMinutes();
                var second=d.getSeconds();
                if(hour<10){
                    hour="0"+hour;
                }
                if(minute<10){
                    minute="0"+minute;
                }
                if(second<10){
                    second="0"+second;
                }
                return hour+":"+minute+":"+second;
            }
        },
        mounted:function () {
            var that = this;
            var id=$.wyui.page.urlParams.id;

            $.wyui.postMethod(urlConfig.report.visitCustomer.getCustomerVisitById, {
                "id":id
            }, function (map) {
                console.log(map);
                that.detail = map;
            });
        }
    });
</script>

</body>
</html>